package mathMethod;

public class Add {

    public static void main(String[] args) {

    }

    public int Add(int num1,int num2) {
        //结果
        int result = 0;
        //进位
        int tmp = 0;
        do {
            result = num1 ^ num2;
            tmp = (num1 & num2) << 1;
            num1 = result;
            num2 = tmp;
        } while (tmp != 0);
        return result;
    }
}
